403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python315/Lib/http/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python315/Lib/http/__pycache__/client.cpython-315.pyc
R
>lqj��c��Qs]PHs]PHs]PHs]PHs]PHs]PHs]PH s]PH$s	]PH(s]QH0G
s
,Q8Ns]PsQsQsQsQsQs\2O-\O.O02\O.O0O32Tt-tFDpUO4aJ	tosQs]ds]dsQ9s\O@Q2OBs"\O@Q2OFs$\O@Q2s%\O@Q2s&.Q:ls'Q;Qks(QQks)QQ \OTOV2s,Q!s-\,1Q"ks.\,1Q#P-Q$kks/Q%Q\O`2s1Q&s2Q'Q2s3]PH�s4Q(Q)\32s5\OmQ)2Q*Q\82s9Q+Q\92s:Q,Q
\92s;Q-Q\92s<Q.Q\92s=Q/Q\92s>Q0Q	\92s?Q1Q\92s@Q2Q\@2sAQ3Q
\@2sBQ4Q\@2sCQ5Q\92sDQ6Q\92sEQ7Q\F\D2sG\9sHP!ttoh\7cK�h9h)<a�
HTTP/1.1 client library

<intro stuff goes here>
<other stuff, too>

HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:

    (null)
      |
      | HTTPConnection()
      v
    Idle
      |
      | putrequest()
      v
    Request-started
      |
      | ( putheader() )*  endheaders()
      v
    Request-sent
      |\_____________________________
      |                              | getresponse() raises
      | response = getresponse()     | ConnectionError
      v                              v
    Unread-response                Idle
    [Response-headers-read]
      |\____________________
      |                     |
      | response.read()     | putrequest()
      v                     v
    Idle                  Req-started-unread-response
                     ______/|
                   /        |
   response.read() |        | ( putheader() )*  endheaders()
                   v        v
       Request-started    Req-sent-unread-response
                            |
                            | response.read()
                            v
                          Request-sent

This diagram presents the following rules:
  -- a second request may not be started until {response-headers-read}
  -- a response [object] cannot be retrieved until {request-sent}
  -- there is no differentiation between an unread response body and a
     partially read response body

Note: this enforcement is applied by the HTTPConnection class. The
      HTTPResponse class does not enforce this state machine, which
      implies sophisticated clients may accelerate the request/response
      pipeline. Caution should be taken, though: accelerating the states
      beyond the above pattern may imply knowledge of the server's
      connection-close behavior for certain requests. For example, it
      is impossible to tell whether the server will close the connection
      UNTIL the response headers have been read; this means that further
      requests cannot be placed into the pipeline until it is known that
      the server will NOT be closing the connection.

Logical State                  __state            __response
-------------                  -------            ----------
Idle                           _CS_IDLE           None
Request-started                _CS_REQ_STARTED    None
Request-sent                   _CS_REQ_SENT       None
Unread-response                _CS_IDLE           <response_class>
Req-started-unread-response    _CS_REQ_STARTED    <response_class>
Req-sent-unread-response       _CS_REQ_SENT       <response_class>
)�urlsplit�HTTPResponse�HTTPConnection�
HTTPException�NotConnected�UnknownProtocol�UnknownTransferEncoding�UnimplementedFileMode�IncompleteRead�
InvalidURL�ImproperConnectionState�CannotSendRequest�CannotSendHeader�ResponseNotReady�
BadStatusLine�LineTooLong�RemoteDisconnected��UNKNOWN�IdlezRequest-startedzRequest-sentis[^:\s][^:\r\n]*s\n(?![ \t])|\r(?![ \t\n])z[- ]z[-]c
� �UOQ2![coo[SOSOSOSO
SO
28QXOSO
8Q
QS8Q02PgPo=hh9h)z<Call data.encode("latin-1") but show a better error message.�latin-1z (z.20z) is not valid Latin-1. Use z9.encode('utf-8') if you want to send it encoded in UTF-8.)�encode�UnicodeEncodeError�encoding�object�start�end�title)�data�name�errs&& � C:\Python315\\Lib\http\client.py�_encoder"�s{��
E��{�{�9�%�%���E� ��L�L��J�J��I�I��G�G��Z�Z�\�4�	�	�#�'�'�2�D�
:�;�AE�	E��E�s��	B
�B
�A)B�B
c�2�U]6�cPgQ[Q[-!)��enc_name�return)�bytes)�formats"r!�__annotate__�_strip_ipv6_iface.__annotate__�s������%��c��UOQ2vqoU%c(UOQ2%fPU2gUQ*
oU!)z)Remove interface scope from IPv6 address.�%�[�])�	partition�
startswith)r%�percent�_s&  r!�_strip_ipv6_ifacer4�sE��#�-�-�d�3��H�q���"�"�4�(�(�2�(�2�(��D����Or+c�(`�\sQs]�snQsQsUsP!)�HTTPMessagec�.�UO2Q*o[U2o,o]oUO2FDXoUPUO2U6Xc]oLUQ*O2%f]oU%fJGUO	U2JZ	U!)a�Find all header lines matching a given header name.

Look through the list of headers and find all lines matching a given
header name (and their continuation lines).  A list of the lines is
returned, without interpretation.  If the header does not occur, an
empty list is returned.  If the header occurs multiple times, all
occurrences are returned.  Case is not important in the header name.

�::N�N)�lower�len�keys�isspace�append)�selfr�n�lst�hit�lines&&    r!�getallmatchingheaders�!HTTPMessage.getallmatchingheaders�s����z�z�|�c�!����I�������I�I�K�D��B�Q�x�~�~��4�'����"�X�%�%�'�'����s��
�
�4� �
 ��
r+�)�__name__�
__module__�__qualname__�__firstlineno__rD�__static_attributes__�__classdictcell__��
__classdict__s@r!r6r6�s�����r+r6c��,oUe[oUO[]*2o[U2[6�c[	Q2gUQ7cU!UOU2[U2U6�fJi[
QUQ02g)z�Reads potential header lines into a list from a file pointer.

Length of line is limited by _MAXLINE, and number of
headers is limited by max_headers.
zheader line�got more than z headers��
�
r+)�_MAXHEADERS�readline�_MAXLINEr;rr>r)�fp�max_headers�headersrCs&&  r!�
_read_headersrZ�s����G���!��
��{�{�8�a�<�(���t�9�x���m�,�,��(�(���N�	���t���w�<�+�%��.��
�X� F�G�Gr+c��QOU2OQ2o[OO	UQ5OU2!)a/
Parses only RFC 5322 headers from header lines.

email Parser wants to see strings rather than bytes.
But a TextIOWrapper around self.rfile would buffer too many bytes
from the stream, bytes which we later need to read as bytes.
So we read the correct bytes here, as bytes, for email Parser
to parse.

r+�
iso-8859-1)�_class)�join�decode�email�parser�Parser�parsestr)�header_linesr]�hstrings&& r!�_parse_header_linesrf�s@���h�h�|�$�+�+�L�9�G��<�<���f��-�6�6�w�?�?r+�_max_headersc�0�[V2o[V12!)z1Parses only RFC 5322 headers from a file pointer.)rZrf)rWr]rgrYs&&$ r!�
parse_headersris���B�-�G��w�/�/r+c�``�\sQsQsnQ"QksQsQP-QksQsQsU1Qks	U1Q	ks
Q
sQsQ#Qks
Q
sQsQsQsQ#QksQsQsQsQ$QksQ$QksQ$U1QkksQsQsQsQ#QksQsQsQsQs Q s!Q!s"Us#U9s$!)%r�	c��UOQ2UmV mV0mP9UmUm[Um[Um[Um	[Um
[Um[Um[Um
PUmP!)�rb)�makefilerW�
debuglevel�_methodrY�msg�_UNKNOWN�version�status�reason�chunked�
chunk_left�length�
will_closerg)r?�sockro�method�urls&&&&&r!�__init__�HTTPResponse.__init__si���-�-��%���$����#'�&���t�x� ������������"������"��� ��r+c��[UOO[]*2Q2o[	U2[6�c[Q2gUO]6�c[Q[U22U%f[Q2gUOP]2vq#oUOQ2%fUO2[U2g[W2oU]d6fUQ6�c[U2gV#W1![c/SOP]2vq#PoK�[cPoK�h9hh9h[c
[S2gh9h)r9r\zstatus linezreply:z-Remote end closed connection without responsezHTTP/��)�strrWrUrVr;rro�print�reprr�split�
ValueErrorr1�_close_connr�int)r?rCrsrtrus&    r!�_read_status�HTTPResponse._read_status1sA���4�7�7�#�#�H�q�L�1�<�@���t�9�x���m�,�,��?�?�Q���(�D��J�'��%�&1�2�
2�	�&*�j�j��q�&9�#�G�V��!�!�'�*�*�������%�%�	&���[�F���|�v��|�#�D�)�)� ,���&�&��%�	�
�"&�*�*�T�1�"5�������
���
��		�� �	&���%�%�	&�sT�C<�D8�%D8�,D8�<	D5�D5�D � 	D1�*D1�-D5�0D1�1D5�8	E�
Ergc��UOdP!Vm[[2FDXoUO	2vq4oU[
6wcLK[
UOU2oUO]6�c
[QU2=JZ	[Q[Q02gU9UmUmUO2UmUQ7c	]
UmL*UO!Q2%c	]UmL[#U2g[%UOUQ59UmUmUO]6�c9UOO)2FDvqx[QUQ*U2J	UOO+Q2o	U	%c%U	O-2Q	6XcP	UmPUmLP
UmUO32UmPUmUOO+Q
2o
U
%c=UO.%f+[9U
2UmUO6]6cPUmLPUmU[<6Xf.U[>6Xf#]dSt96:c]�6fLUO@Q6Xc]UmUO4%f.UO.%fUO6e
P	UmP!P!P!P![:cPSmK�h9h)
Nzheaders:rPz interim responseszHTTP/1.�rg�header:r8�transfer-encodingrv�content-length�HEAD)zHTTP/1.0zHTTP/0.9)!rYrg�range�_MAXINTERIMRESPONSESr��CONTINUErZrWror�r�codert�striprursr1rrirq�items�getr:rvrw�_check_closeryrxr�r��
NO_CONTENT�NOT_MODIFIEDrp)r?rgr3rsrtru�skipped_headers�hdr�val�tr_encrxs&$         r!�begin�HTTPResponse.beginRsU���<�<�#��
)���+�,�A�&*�&7�&7�&9�#�G�V���!��+�D�G�G�\�B�O�����"��j�/�2��-� � �!5� 6�6H�I�K�
K�#)�(��	�D�K��l�l�n����.�.��D�L�
�
�
�	�
*�
*��D�L�!�'�*�*�"/��G�G�,�#
�	
���t�x��?�?�Q�� �L�L�.�.�0����i��s��C�0�1����!�!�"5�6���f�l�l�n�	�1��D�L�"�D�O� �D�L��+�+�-���������!�!�"2�3���$�,�,�,�
'�!�&�k����;�;��?�"&�D�K���D�K�
�j� �F�l�$:��6��C���L�L�F�"��D�K�
���������K�K��"�D�O�
 �� ��#�
#�"���
#�s�?J/�/	K�9K�Kc��UOOQ2oUO]6Xc"U%cQUO27cP	!P
!UOOQ2%cP
!U%cQUO27cP
!UOOQ2oU%cQUO27cP
!P	!)�
connection�closez
keep-alivezproxy-connection)rYr�rsr:)r?�conn�pconns&  r!r��HTTPResponse._check_close�s����|�|����-���<�<�2����4�:�:�<�/����<�<���L�)�)���L�D�J�J�L�0����� � �!3�4���\�U�[�[�]�2��r+c�N�UOoPUmUO2P!�N)rWr�)r?rWs& r!r��HTTPResponse._close_conn�s��
�W�W�����
���
r+c�:�[RU_2UO%cUO2P!P!SO%cSO2hh9hr�)�superr�rWr��r?�	__class__s&�r!r��HTTPResponse.close�sF���	#��G�M�O��w�w�w�� � �"���t�w�w�w�� � �"��s�8�A�Ac�:�[RU_2UO%cUOO2P!P!r�)r��flushrWr�s&�r!r��HTTPResponse.flush�s'���
��
���7�7�7��G�G�M�M�O�r+c��P	!)zAlways returns TruerF�r?s&r!�readable�HTTPResponse.readable�s��r+c� �UOPI!)z!True if the connection is closed.)rWr�s&r!�isclosed�HTTPResponse.isclosed�s���w�w�$��r+c�8�UOeQ!UOQ6XcUO2Q!UO%cUO	U2!Ud�U]6�c�UO
dVO
6�c
UO
oUOO
U2oU%fU%cUO2U!UO
dEU9O
[U2*tmUO
%fUO2U!UO
eUOO
2oL#UOUO
2o]UmUO2U![cSO2gh9h)z?Read and return the response body, or up to the next amt bytes.r+r�)
rWrpr�rv�
_read_chunkedrx�readr;�
_safe_readr	)r?�amt�ss&& r!r��HTTPResponse.read�s:���7�7�?���<�<�6�!�������<�<�<��%�%�c�*�*��?�s�a�x��{�{�&�3���+<��k�k�������S�!�A���� � �"�
�H�	���(����s�1�v�%���{�{�{��$�$�&��H��{�{�"��G�G�L�L�N���������4�A� ��������H��&���$�$�&���s�E<�<	F�Fc�@�UOe]!UOQ6XcUO2]!UO%cUO	U2!UO
d3[
U2UO
6�c[U2]UO
oUOOU2oU%fU%cUO2U!UO
d<U9O
U*tmUO
%fUO2U!)zNRead up to len(b) bytes into bytearray b and return the number
of bytes read.
r�)	rWrpr�rv�_readinto_chunkedrxr;�
memoryview�readinto)r?�br@s&& r!r��HTTPResponse.readintos���
�7�7�?���<�<�6�!�������<�<�<��)�)�!�,�,��;�;�"��1�v����#��q�M�!�D�K�K�0��

�G�G���Q����Q�
����
��	�[�[�
$��K�K�1��K��;�;�;�� � �"��r+c�"�UOO[]*2o[U2[6�c[	Q2gUOQ2oU]6�cUPUo[
U]2![cSO2gh9h)r9z
chunk size�;)	rWrUrVr;r�findr�r�r�)r?rC�is&  r!�_read_next_chunk_size�"HTTPResponse._read_next_chunk_size1s����w�w����1��-���t�9�x���l�+�+��I�I�d�O����6����8�D�	��t�R�=� ���	�
�����		�s�%A1�1	B�;Bc�&�UOoUe[o]oUOO[]*2o[U2[6�c[
Q2gU%fP!UQ7cP!U]*
oV!6�fJj[QUQ02g)Nztrailer linerPz	 trailersrQ)rgrTrWrUrVr;rr)r?�max_trailers�
trailers_readrCs&   r!�_read_and_discard_trailer�&HTTPResponse._read_and_discard_trailerAs����(�(����&�L��
���7�7�#�#�H�q�L�1�D��4�y�8�#�!�.�1�1����,�,��

�Q��M��+�#�n�\�N�)�$L�M�Mr+c��UOoU%fVUdUO]2UO2oU]6Xc#UO2UO
2PoVmU![c
[	Q2gh9h�Nr+)rwr�r�r�r	r�r�)r?rws& r!�_get_chunk_left�HTTPResponse._get_chunk_leftZs����_�_�
���%�����"�
*�!�7�7�9�
��Q���.�.�0�� � �"�!�
�(�O�����
*�$�S�)�)�
*�s�A-�-	B�7
Bc���UO[6wfPgUd
U]6cPo,oUO29odnUd5V6:c/UOUO	U22V1*
UmL5UOUO	U22Ud	V*o]UmJ�QO
U2![c!o[QO
S22SgPo=hh9hr�)rvrrr�r>r�rwr^r	)r?r��valuerw�excs&&   r!r��HTTPResponse._read_chunkedrs����|�|�x�'�'�'��?�s�Q�w��C���
	;�!%�!5�!5�!7�7�:�D��?�s�'8��L�L�����!5�6�&0�&6�D�O�����T�_�_�Z�8�9��?��%�C�"#����8�8�E�?�"���	;� ����%��1�s�:��	;�s5�B;�B;�B;�AB;�!B;�;	C&�C&�C!�!C&c��UO[6wfPg]o[U2oUO2oUeU![	U2U6:c'UOU2oVE*
UmV%*!UPUoUOU2oV5PoV%*
o]UmJx[c[[S]S22gh9h)�)	rvrrr�r�r;�_safe_readintorwr	r')r?r��total_bytes�mvbrwr@�temp_mvbs&&     r!r��HTTPResponse._readinto_chunked�s����|�|�x�'�'�'�����m��	:��!�1�1�3�
��%�&�&��s�8�z�)��+�+�C�0�A�&0�n�D�O�&�?�*��{�
�+���'�'��1���"�g��� ��"#�����	:� ��q��;�'7�!8�9�9�	:�s'�B�B�B�%B�4+B�	C�)Cc��[U[2oUOOU2o[	U2U6�cU![	U2U6c[V1[	U2*
2g[OU2oUO]]2[V!U*
2oUOUOOU22UO2U6�cUO2!V$*
oUO2U6fJ�[UO2VO2*
2g)z�Read the number of bytes requested.

This function should be used when <amt> bytes "should" be present for
reading. If the bytes are truly not available (due to EOF), then the
IncompleteRead exception can be used to detect the problem.
)�min�_MIN_READ_BUF_SIZErWr�r;r	�io�BytesIO�seek�write�tell�getvalue)r?r��cursizer�deltas&&   r!r��HTTPResponse._safe_read�s����c�-�.���w�w�|�|�G�$���t�9����K��t�9�w�� ��S��Y��7�7��z�z�$����	�	�!�Q�����w��/�E��J�J�t�w�w�|�|�E�*�+��y�y�{�c�!��}�}��&���G��y�y�{�W�$�$�T�]�]�_�c�I�I�K�6G�H�Hr+c��[U2oUOOU2oV26c[[	UPU2V#*
2gU!)z2Same as _safe_read, but for reading into a buffer.)r;rWr�r	r')r?r�r�r@s&&  r!r��HTTPResponse._safe_readinto�sB���!�f���G�G���Q����7� ��q��!�u��s�u�5�5��r+c��UOdUOQ6XcQ!UO%cUOU2!UOd$U]6fVO6�c
UOoUOOU2oU%fU%cUO
2U!UOdEU9O[U2*tmUO%fUO
2U!)zfRead with at most one underlying system call.  If at least one
byte is buffered, return that instead.
r�r+)rWrprv�_read1_chunkedrx�read1r�r;)r?r@�results&& r!r��HTTPResponse.read1�s����7�7�?�d�l�l�f�4���<�<�<��&�&�q�)�)��;�;�"��A���[�[�����A������q�!���!�����
�
�	�[�[�
$��K�K�3�v�;�&�K��;�;�;�� � �"��
r+c���UOdUOQ6XcQ!UO%cUOU2!UOO	U2!�Nr�r+)rWrprv�
_peek_chunked�peek)r?r@s&&r!r��HTTPResponse.peek�sG���7�7�?�d�l�l�f�4���<�<�<��%�%�a�(�(��w�w�|�|�A��r+c�:�UOdUOQ6XcQ!UO%c[RU_U2!UO
d$U]6fVO
6�c
UO
oUOO	U2oU%fU%cUO
2U!UO
dEU9O
[U2*tmUO
%fUO
2U!r�)rWrprvr�rUrxr�r;)r?�limitr�r�s&& �r!rU�HTTPResponse.readline�s�����7�7�?�d�l�l�f�4���<�<�<��7�#�E�*�*��;�;�"���	�U�[�[�5H��K�K�E����!�!�%�(���%�����
�
�	�[�[�
$��K�K�3�v�;�&�K��;�;�;�� � �"��
r+c��UO2oUdU]6XcQ!]St96:cU6:fLSoUOOU2oU9O[	U2*tmU%f[Q2gU!r�)r�rWr�rwr;r	)r?r@rwr�s&&  r!r��HTTPResponse._read1_chunked�sj���)�)�+�
����a����Q�$�*�$��A��w�w�}�}�Q������3�t�9�$��� ��%�%��r+c��UO2oUeQ!UOOU2PU![cQ!h9h)r+)r�r	rWr�)r?r@rws&& r!r��HTTPResponse._peek_chunked�sP��	��-�-�/�J�����w�w�|�|�J�'���4�4��
�	��	�s�7�	A�A�Ac�8�UOO2!r�)rW�filenor�s&r!r��HTTPResponse.fileno	s���w�w�~�~��r+c���UOe[2gUOOU29%fSo[U[2%f[UQ2%fU!QO
U2!)aHReturns the value of the header matching *name*.

If there are multiple matching headers, the values are
combined into a single string separated by commas and spaces.

If no matching header is found, returns *default* or None if
the *default* is not specified.

If the headers are unknown, raises http.client.ResponseNotReady.

�__iter__z, )rYr�get_all�
isinstancer��hasattrr^)r?r�defaultrYs&&& r!�	getheader�HTTPResponse.getheaders`���<�<��"�$�$��,�,�&�&�t�,�7�7����g�s�#�#�7�7�J�+G�+G��N��9�9�W�%�%r+c�z�UOe[2g[UOO22!)z&Return list of (header, value) tuples.)rYr�listr�r�s&r!�
getheaders�HTTPResponse.getheaders s-���<�<��"�$�$��D�L�L�&�&�(�)�)r+c��U!r�rFr�s&r!r�HTTPResponse.__iter__(s���r+c��UO!)a�Returns an instance of the class mimetools.Message containing
meta-information associated with the URL.

When the method is HTTP, these headers are those returned by
the server at the head of the retrieved HTML page (including
Content-Length and Content-Type).

When the method is FTP, a Content-Length header will be
present if (as is now usual) the server passed back a file
length in response to the FTP retrieval request. A
Content-Type header will be present if the MIME type can be
guessed.

When the method is local-file, returned headers will include
a Date representing the file's last-modified time, a
Content-Length giving file size, and a Content-Type
containing a guess at the file's type. See also the
description of the mimetools module.

)rYr�s&r!�info�HTTPResponse.info-s��*�|�|�r+c��UO!)a*Return the real URL of the page.

In some cases, the HTTP server redirects a client to another
URL. The urlopen() function handles this transparently, but in
some cases the caller needs to know which URL the client was
redirected to. The geturl() method can be used to get at this
redirected URL.

)r|r�s&r!�geturl�HTTPResponse.geturlDs
���x�x�r+c��UO!)zeReturn the HTTP status code that was sent with the response,
or None if the URL is not an HTTP URL.

)rtr�s&r!�getcode�HTTPResponse.getcodePs��
�{�{�r+)rgrprwrvr�rorWrYrxrqrurtrsry)r�NNr�)���)%rGrHrIrJr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rUr�r�r�rrrrrrrKrL�
__classcell__�r�rNs@@r!rr	s�����!�>'�BP#�D�P#�d�:�
#��
��&�P �D� N�2�0;�(:�0I�6��&��"�5� �&�(*��
�.
��r+c��[O2oU]6XcUOQ,2UOdP	UmU!)�zhttp/1.1)�ssl�_create_default_https_context�set_alpn_protocols�post_handshake_auth)�http_version�contexts& r!�_create_https_contextr#XsC���/�/�1�G��r���"�"�J�<�0��"�"�.�&*��#��Nr+c�4`�\sQsQsn]sQs\s\s	]s
]s\Q2s
\Q2sP\O PQ1QP-QkksQ QksQ	sQ
sQsQsQ
sQsQsQsQsQsQ!QksQ"QksQsQs Qs!Qs"Qs#Q#QP
-Qkks$P-1QP
-Qkks%Qs&Qs'Qs(Us)P!)$r�ezHTTP/1.1c�8�[U[O2!)zFTest whether a file-like object is a text or a binary stream.
        )rr��
TextIOBase)�streams&r!�
_is_textIO�HTTPConnection._is_textIOos���&�"�-�-�0�0r+c��UeUO2[7c]!P![UQ2%cP![U2oUO![
cLh9h[
S[2%c[S2!P!)z�Get the content-length based on the body.

If the body is None, we set Content-Length: 0 for methods that expect
a body (RFC 7230, Section 3.3.2). We also set the Content-Length for
any method if the body is a str or bytes-like object and not a file.
r�)	�upper�_METHODS_EXPECTING_BODYrr��nbytes�	TypeErrorrr�r;)�bodyr{�mvs&& r!�_get_content_length�"HTTPConnection._get_content_lengthusw���<��|�|�~�!8�8����4�� � ��	��D�!�B��9�9����	��	���d�C� � ��t�9��s�A�	A�A�A� �max_response_headersc�Z�V0mV@mVPmPUm,UmPUm[UmPUmPUm	PUm
-UmPUmV`m
UOV2vUmUmUO#UO2[$O&UmP!r�)�timeout�source_address�	blocksizerz�_buffer�_HTTPConnection__response�_CS_IDLE�_HTTPConnection__staterp�_tunnel_host�_tunnel_port�_tunnel_headers�_raw_proxy_headersr5�
_get_hostport�host�port�_validate_host�socket�create_connection�_create_connection)r?rCrDr7r8r9r5s&&&&&&$r!r}�HTTPConnection.__init__�s�����,��"����	������������� ��� ���!���"&���$8�!�!%�!3�!3�D�!?����D�I����D�I�I�&�#)�":�":��r+c�"�UO%c[Q2gUOV2vUmUmU%cUO2UmLUOO2[9PIc&QUO2D%fJP	L	P
LQUO22%fNUOOQ2OQ2oQV@O1*UOQ$P!P!)aySet up host and port for HTTP CONNECT tunnelling.

In a connection that uses HTTP CONNECT tunnelling, the host passed to
the constructor is used as a proxy server that relays all communication
to the endpoint passed to `set_tunnel`. This done by sending an HTTP
CONNECT request to the proxy server when the connection is established.

This method must be called before the HTTP connection has been
established.

The headers argument should be a mapping of extra HTTP headers to send
with the CONNECT request.

As HTTP/1.1 is used for HTTP CONNECT tunnelling request, as per the RFC
(https://tools.ietf.org/html/rfc7231#section-4.3.6), a HTTP Host:
header must be provided, matching the authority-form of the request
target provided as the destination for the CONNECT request. If a
HTTP Host: header is not provided via the headers argument, one
is generated and transmitted automatically.
z.Can't set up tunnel for established connectionc3�R�SF �DpO2Q6Hw�	J	P!3h)rC�r:)�.0�headers& r!�	<genexpr>�,HTTPConnection.set_tunnel.<locals>.<genexpr>�s��:N���:N��<�<�>�V�+�:N�s� '�idna�asciiz%s:%d�Host)rz�RuntimeErrorrBr>r?�copyr@�clear�anyrr_)r?rCrDrY�encoded_hosts&&&& r!�
set_tunnel�HTTPConnection.set_tunnel�s���,�9�9�9��O�P�P�/3�/A�/A�$�/M�,���4�,��#*�<�<�>�D� �� � �&�&�(��s�O�$�:N�:N�O�s�s�s�O�$�:N�:N�O�O�O��,�,�3�3�F�;�B�B�7�K�L�+2��/�/�61�,1�D� � ��(�Pr+c��UePUOQ2oUOQ2oV46�c[V]*P2oUPUoLUOoU%c"U]*Q6XcUP*Q6XcU]PoV1![c;X]*PP6XcSOoKg[	QX]*P*2gh9h)Nr8�]znonnumeric port: '%s'�[)�rfindr�r��default_portr
)r?rCrDr��js&&&  r!rB�HTTPConnection._get_hostport�s����<��
�
�3��A��
�
�3��A��u�O��t�a�C�D�z�?�D��B�Q�x���(�(���D��G�s�N�t�B�x�3����"�:�D��|���"�O��a�C�D�z�R�'�#�0�0��(�)@�4�!���:�)M�N�N�	O�s�B�	C�C�C�*Cc��VmP!r�)ro)r?�levels&&r!�set_debuglevel�HTTPConnection.set_debuglevel�s���r+c�R�QU7cU]*][6wcQU*Q*!U!)�:r.r/rF)r?�ips&&r!�
_wrap_ipv6�HTTPConnection._wrap_ipv6�s(���2�:�"�Q�%�7�*��"�9�t�#�#��	r+c��[OUO2%c[QUO802gQUO	UOOQ22UOUOOQ21*oU,oUOO2FD�vq4UOQ2oUOQ2o[U2%f[QU802g[U2%c[QU802gUOQVV1*2J�	UOQ2UOQ	OU22=UOUO UO"Q
5oUO%2vq�o
['UO(UO*2UmUO.]6�c/UO,FDo[1QUO322J	U	[4O6O86wc0UO;2[=QU	Q
U
O?202gUO;2P!SO;2h9h)z-Tunnel host can't contain control characters sCONNECT %s:%d %s
rQrRr�Invalid header name �Invalid header value s%s: %s
rRr+�r{r�zTunnel connection failed: � ) �!_contains_disallowed_url_pchar_re�searchr>r�rirr?�
_http_vsn_strr@r��_is_legal_header_name�_is_illegal_header_valuer>�sendr^�response_classrzrpr�rZrWr5rAror�r_�http�
HTTPStatus�OKr��OSErrorr�)r?�connectrYrNr��header_bytes�value_bytes�responsersr��messages&          r!�_tunnel�HTTPConnection._tunnel�s���,�3�3�D�4E�4E�F�F�� $� 1� 1�4�5�
5�)��O�O�D�-�-�4�4�V�<�=�������%�%�g�.�-0�0���)��!�1�1�7�7�9�M�F�!�=�=��3�L��,�,�y�1�K�(��6�6� �\�!K�L�L�'��4�4� �k�!K�L�L��N�N�=�L�+F�F�G�:�	���w��	
�	�	�#�(�(�7�#�$���&�&�t�y�y����&�F��	�'/�'<�'<�'>�$�W�G�&3�H�K�K��AZ�AZ�&[�D�#�����"�"�5�5�F��)�V�]�]�_�5�6��t���)�)�)��
�
��� :�4�&��'�-�-�/�AR�S�T�T�*�

�N�N���H�N�N��s�AI+�AI+�)/I+�+I=c�N�UOd[UO2!P!)z�
Returns a dictionary with the headers of the response
received from the proxy server to the CONNECT request
sent to set the tunnel.

If the CONNECT request was not sent, the method returns None.
)rArfr�s&r!�get_proxy_response_headers�)HTTPConnection.get_proxy_response_headerss/���&�&�2�
 �� 7� 7�8�	
��	
r+c��[OQVOUO2UO	UOUO1UO
UO2UmUOO[O[O]2UO%cUO!2P!P![c+oSO[O6wcgPo=KVPo=hh9h)z3Connect to the host and port specified in __init__.zhttp.client.connect)�sys�auditrCrDrHr7r8rz�
setsockoptrF�IPPROTO_TCP�TCP_NODELAYrz�errno�ENOPROTOOPTr>r��r?�es& r!r{�HTTPConnection.connect$s����	�	�'��y�y�$�)�)�D��+�+�
�Y�Y�t�y�y�!�4�<�<��1D�1D�F��	�	��I�I� � ��!3�!3�V�5G�5G��K�
�����L�L�N���	�	��w�w�%�+�+�+��,��	�s$�19C�	D�D�D�:D�Dc�2�[UmUOoU%cPUmUO2UOoU%cPUmUO2P!P!SOoS%cPSmSO2hh9h)z(Close the connection to the HTTP server.)r<r=rzr�r;)r?rzr~s&  r!r��HTTPConnection.close3sr�����		!��9�9�D�� ��	��
�
�����H��"&������ ������H��"&������ ��s�A(�A(�(B�=Bc���UOe.UO%cUO2L
[2gUO]6�c[Q[
U22[UQ2%c�UO]6�c[Q2UOU2oU%cUO]6�c[Q2UOUO29o%cNU%cUOQ2o[OQV2UOOU2JpP![OQV2UOOU2P![co[!S["O$O&2%c)SFDoSOOS2J 	P![Q[)S2*2gh9h)z�Send 'data' to the server.
``data`` can be a string object, a bytes object, an array object, a
file-like object that supports a .read() method, or an iterable object.
zsend:r�zsending a readable�encoding file using iso-8859-1r\zhttp.client.sendz9data should be a bytes-like object or an iterable, got %r)rz�	auto_openr{rror�r�rr)r�r9rr�r��sendallr/r�collections�abc�Iterable�type)r?rr�	datablock�ds&&   r!ru�HTTPConnection.sendAsf���9�9���~�~�~�����"�n�$��?�?�Q���'�4��:�&��4�� � �����"��*�+��_�_�T�*�F��$�/�/�A�-��6�7�#�y�y����8�8�)�8�� )� 0� 0�� >�I��	�	�,�d�>��	�	�!�!�)�,���	�	�$�d�1�	G��I�I���d�#���	G��$���� 8� 8�9�9��A��I�I�%�%�a�(�� �!9�;?��:�!F�G�G�	G�s�E-�-	G&�7*G&�"%G&�
G&c�>�UOOU2P!)zeAdd a line of output to the current request buffer.

Assumes that the line does *not* end with \r\n.
)r:r>)r?r�s&&r!�_output�HTTPConnection._outputfs��
	
�����A�r+c#�8 �UO]6�c[Q2UOU2oU%cUO]6�c[Q2UOUO29o%c!U%cUOQ2oUw�	JCP!3h)r�zreading a readabler�r\)ror�r)r�r9r)r?r�rr�s&&  r!�_read_readable�HTTPConnection._read_readablemst����?�?�Q���&�'�����*���d�o�o��)��2�3�#�=�=����8�8�i�8��%�,�,�\�:�	��O�9�s!�B�#B�B�
-B�8B�Bc��UOOQ
2QOUO2oUOQUOU2Ud�[	UQ2%cUOU2oL[
U2U1oSFDoU%fUO]6�c[Q2J)U%c>UO]6Xc-[U2Q
Q0OQ2U*Q*oUOU2J�	U%c'UO]6XcUOQ	2P!P!P!P![c:[S2oK�[c[Q[S2*2gh9hh9h)z�Send the currently buffered request and clear the buffer.

Appends an extra \r\n to the buffer.
A message_body may be specified, to be appended to the request.
rR:NNNr�zAmessage_body should be a bytes-like object or an iterable, got %rzZero length chunk ignored�Xz
rRs0

)r+r+)r:�extendr^rurr�r�r/�iterr�ror��	_http_vsnr;r)r?�message_body�encode_chunkedrq�chunks�chunks&&&   r!�_send_output�HTTPConnection._send_outputxs^��	
�����J�'��l�l�4�<�<�(���L�L��O��	�	�#���#��|�V�,�,��,�,�\�:��-�
�|�,�+�_�F��������*��9�:��!�d�n�n��&:�"�5�z�!�n�D�1�8�8��A�E�I�!�"�E��	�	�%� � ��$�.�.�B�"6��	�	�,�'�#7�~�O$��!�>�>�!%�l�!3���$�>�'�)H�*.�|�*<�)=�>�>�>��>�s*�?E�	F	�F	�E�	F�(F�F	c��UO%c(UOO2%cPUmUO[6Xc
[UmL[UO2gUO
U2VmS9%fQoUOU2U8QU8QUO80oUOUOU22UO]6XCcLU%Cf%PoUOQ2%c[U2vqvoU%c/UOQ2oUO#Q[%U22L�UO&%cUO&o	UO(o
LUO*o	UO,o
U	OQ2oUO/U2oQU	7c[%U2oV�O06XcUO#QU2L*UO3Q2oUO#QU8QU
802U%fUO#QQ	2P!P!P![ cSOQ2oCK h9h[ cS	OQ2oK�h9h)
a0Send a request to the server.

'method' specifies an HTTP request method, e.g. 'GET'.
'url' specifies the object being requested, e.g. '/index.html'.
'skip_host' if True does not add automatically a 'Host:' header
'skip_accept_encoding' if True does not add automatically an
   'Accept-Encoding:' header
�/rorwrRrQrSr8zAccept-Encoding�identity)r;r�r=r<�_CS_REQ_STARTEDr�_validate_methodrp�_validate_pathrrr��_encode_requestr�r1rrr�	putheaderr4r>r?rCrDrir_r_)r?r{r|�	skip_host�skip_accept_encoding�request�netloc�nil�
netloc_encrCrD�host_encs&&&&&       r!�
putrequest�HTTPConnection.putrequest�s���?�?�?�t���7�7�9�9�"�D�O�*�<�<�8�#�*�D�L�#�D�L�L�1�1����f�%����j�j�S�����C� � &��T�-?�-?�@�����T�)�)�'�2�3��>�>�R���9����>�>�&�)�)�19�#��.�C��c�3��;�%+�]�]�7�%;�
��N�N�6�+<�Z�+H�I��(�(�(�#�0�0��#�0�0��#�y�y��#�y�y��7�#'�;�;�w�#7�� $���x�8�H��d�{�#4�X�#>���0�0�0����v�x�8�#+�?�?�7�#;�����v�(�D�/I�J�(����0�*�=�(�
��c.�;�%+�]�]�6�%:�
�;��.�7�#'�;�;�v�#6��7�s0�)H;�I�;	I�I�I�	I=�(I=�<I=c�&�UOQ2!)rR)r)r?r�s&&r!r��HTTPConnection._encode_request-s���~�~�g�&�&r+c��[OU2oU%c#[QU8QUO28Q02gP!)z&Validate a method name for putrequest.z)method can't contain control characters. � (found at least �))�$_contains_disallowed_method_pchar_rerqr��group)r?r{�matchs&& r!r��HTTPConnection._validate_method1sI��5�;�;�F�C����?��z�J'�',�{�{�}�&7�q�:�;�
;�r+c��[OU2oU%c#[QU8QUO28Q02gP!)zValidate a url for putrequest.�&URL can't contain control characters. r�r��rprqr
r�)r?r|r�s&& r!r��HTTPConnection._validate_path:sL��2�8�8��=����E�c�W�M0�05���
�/@��C�D�
D�r+c��[OU2oU%c#[QU8QUO28Q02gP!)z9Validate a host so it doesn't contain control characters.r�r�r�r�)r?rCr�s&& r!rE�HTTPConnection._validate_hostBsL��2�8�8��>����E�d�X�N0�05���
�/@��C�D�
D�r+c�x�UO[6wc[2g[UQ2%cUO	Q2o[U2%f[
QU802g[U2o[U2FD�vq4[UQ2%cUO	Q2V#$L2[U[2%c[U2O	Q2V#$[V#*2%fJv[
QV#*802g	QOU2oUQ*U*oUOU2P!)z[Send a request header line to the server.

For example: h.putheader('Accept', 'text/html')
rrRrlrrms
	s: )r=r�r
rrrsr�r
�	enumeraterr�r�rtr^r�)r?rN�valuesr��	one_valuer�s&&*   r!r��HTTPConnection.putheaderJs���
�<�<�?�*�"�$�$��6�8�$�$��]�]�7�+�F�$�V�,�,���A�B�B��f���%�f�-�L�A��y�(�+�+�%�,�,�Y�7��	��I�s�+�+��	�N�1�1�'�:��	�'��	�2�2� �f�i�!I�J�J�.����v�&���%��%�'�����V�r+r�c��UO[6Xc
[UmL
[2gUO	VQ5P!)z�Indicate that the last header line has been sent to the server.

This method sends the request to the server.  The optional message_body
argument can be used to pass a message body associated with the
request.
�r�)r=r��_CS_REQ_SENTr
r�)r?r�r�s&&$r!�
endheaders�HTTPConnection.endheadersfs1���<�<�?�*�'�D�L�"�$�$����,��Fr+c�.�UOVV4U2P!)z&Send a complete request to the server.)�
_send_request)r?r{r|r0rYr�s&&&&&$r!r��HTTPConnection.requestss��	
���6��~�Fr+c�B�[QU22o-oQU7c]UQ$QU7c]UQ$UOV1-U@QU7cwQU7coP
oUOV12oUe=Ud8UO]6�c[	QU*2P	oUOQQ	2LUOQ
[
U22LP
oUO2FDvq�UOV�2J	[U[2%c
[UQ2oUOV5Q5P!)
c3�L�SF �DpO2w�	J	P!3hr�rL)rM�ks& r!rO�/HTTPConnection._send_request.<locals>.<genexpr>zs��G���G�q�����G�s�$rCr�zaccept-encodingr�r�r�zUnable to determine size of %rzTransfer-EncodingrvzContent-Lengthr0r�)�	frozensetr�r2ror�r�r�r�rr"r�)r?r{r|r0rYr��header_names�skips�content_lengthr�r�s&&&&&&     r!r��HTTPConnection._send_requestxs�� � <�G� <�<�����\�!�!"�E�+����,�,-�E�(�)�����-�u�-��<�/�#�,�6�"'��!%�!9�!9�$�!G��!�)��'��?�?�Q�.�!�"B�T�"I�J�)-�����':�I�F���N�N�#3�S��5H�I��"�N�!�-�-�/�J�C��N�N�3�&�*��d�C� � ��4��(�D������<r+c�H�UO%c(UOO2%cPUmUO[6wfUO%c[	UO2gUO
]6�c4UO
UOUO
UOQ5oL'UO
UOUOQ5oUOeUO2LUOUOQ5UO[6wfPg[UmUO%cUO2U!VmU![cSO2gh9hSO2g9h)a�Get the response from the server.

If the HTTPConnection is in the correct state, returns an
instance of HTTPResponse.

If a request has not been sent or if a previous response has
not be handled, ResponseNotReady is raised.  If the HTTP
response indicates that the connection should be closed, then
it will be closed before the response is returned.  When the
connection is closed, the underlying socket is closed.
rnr�)r;r�r=r�rrorvrzrpr5r��ConnectionErrorr�ryrrr<)r?r~s& r!�getresponse�HTTPConnection.getresponse�sH���?�?�?�t���7�7�9�9�"�D�O�"�<�<�<�'�4�?�?�?�"�4�<�<�0�0��?�?�Q���*�*�4�9�9�d�o�o�26�,�,�+�@�H��*�*�4�9�9�T�\�\�*�J�H�	�
��,�,�4��N�N�$��N�N��0I�0I�N�J��&�&�(�2�2�2�#�D�L��"�"�"��
�
��
�O�#+���O��#�
��
�
���
��	��N�N���sH�$
E.�2E.�F�E.�F�5F�F�&F�.	F�8F�F�F!)�
__response�__stater:rHrprAr@r>r?r9rorCr5rDrzr8r7)NN)NF)FFr�)*rGrHrIrJr�rrrrv�	HTTP_PORTr_r�ro�staticmethodr)r2rF�_GLOBAL_DEFAULT_TIMEOUTr}rYrBrdrir�r�r{r�rur�r�r�r�r�r�r�rEr�r�r�r�r�rKrLrMs@r!rres������I��M�!�N��L��I��J��1��1�
����>#'��0N�0N� $��;�NR�;�0"1�H�( ��
'�R
�
�!�#G�J�	�4(�l}�~'�;�D�D��8G�e�G�)-�b�G�$�G�
,=�\?�?r+c�x``�\sQsQsnQs\sQQ\OQPQPQQQP-U1Q	kkks	U1Q
ks
QsUsU9s
!)
�HTTPSConnectioni�z(This class allows communication via SSL.r7r8r"r9r4r5c	�x:�[[U_VUUUUQ5Ue[UO2oVPmP!))r9r5)r�r�r}r#r��_context)	r?rCrDr7r8r"r9r5r�s	&&&$$$$$�r!r}�HTTPSConnection.__init__�sA���
�/�4�1�$�g�2@�<E�G[�
2�
]���/����?��#�Mr+c��:�[RU_2UO%cUOoLUOoUOOUOUQ5UmP!)z(Connect to a host on a given (SSL) port.)�server_hostname)r�r{r>rCr��wrap_socketrz)r?r�r�s& �r!r{�HTTPSConnection.connect�sT���
�G�O��� � � �"&�"3�"3��"&�)�)���
�
�1�1�$�)�)�BQ�2�S�D�Ir+)r�rzr�)rGrHrIrJ�__doc__�
HTTPS_PORTr_rFr�r}r{rKrLrrs@@r!r�r��sS����2�!��
	$� &� >� >�
	$�$(�
	$�26�
	$�BF�
	$�+/�
	$�
	$�	S�	Sr+r�c��\sQsQsQsP!)rirF�rGrHrIrJrKrFr+r!rrs��	r+c��\sQsQsQsP!)rirFr�rFr+r!rr���r+c��\sQsQsQsP!)r
irFr�rFr+r!r
r
r�r+c�(`�\sQsQsnQsQsUsP!)ric�$�U1UmVmP!r���argsrs)r?rss&&r!r}�UnknownProtocol.__init__s���H��	��r+r��rGrHrIrJr}rKrLrMs@r!rrs�����r+c��\sQsQsQsP!)rirFr�rFr+r!rrr�r+c��\sQsQsQsP!)rirFr�rFr+r!rrr�r+c�J`�\sQsQsnQQksQs\OsQsUs	P!)r	i"c�0�U1UmVmV mP!r�)r�partial�expected)r?rrs&&&r!r}�IncompleteRead.__init__#s���H��	��� �
r+c��UOdQUO*oLPoQUOO[UO2U1*!)Nz, %i more expectedz%s(%i bytes read%s))rr�rGr;rr�s& r!�__repr__�IncompleteRead.__repr__'sK���=�=�$�$�t�}�}�4�A��A�$����(?�(?�(+�D�L�L�(9�1�(>�>�	>r+)rrrr�)
rGrHrIrJr}rr�__str__rKrLrMs@r!r	r	"s����!�>��n�n�Gr+c��\sQsQsQsP!)ri0rFr�rFr+r!rr0r�r+c��\sQsQsQsP!)ri3rFr�rFr+r!rr3r�r+c��\sQsQsQsP!)r
i6rFr�rFr+r!r
r
6r�r+c��\sQsQsQsP!)ri9rFr�rFr+r!rr9r�r+c�(`�\sQsQsnQsQsUsP!)ri<c�J�U%f[U2oU1UmVmP!r�)r�rrC)r?rCs&&r!r}�BadStatusLine.__init__=s�����:�D��E��	��	r+)rrCrrMs@r!rr<s�����r+c�(`�\sQsQsnQsQsUsP!)riCc�N�[OUQ[U1*2P!)z&got more than %d bytes when reading %s)rr}rV)r?�	line_types&&r!r}�LineTooLong.__init__Ds"�����t�%M�(0�)�'<�&=�	>r+rFrrMs@r!rrCs����>�>r+c�(`�\sQsQsnQsQsUsP!)riHc�j�[OUP2[OU,UN3-U@P!)�)rr}�ConnectionResetError)r?�pos�kws&*,r!r}�RemoteDisconnected.__init__Is*�����t�R�(��%�%�d�7�S�7�B�7r+rFrrMs@r!rrHs����8�8r+)rrrrrrrr	r
rrr
rrrr�error�	responsesi>�PUT�POST�PATCH)r)Ir��email.parserr`�
email.messager�rwr��rerFr��collections.abcr��urllib.parser�__all__r�r�rrr<r�r��globals�updaterx�__members__r��phraser!rVrTr�r��compile�	fullmatchrsrqrtrpr�r-r"r4r�Messager6rZrfri�BufferedIOBaserr#rrr�r>�ImportError�	Exceptionrrr
rrrr	rrr
rrrrrr )�vs0r!�<module>r6sv��D�L����	�	�
�
��!���
�	�
�
�����#�����	������,�,�-�#'�/�/�"=�"=�"D�"D�"F�G�"F�Q����[�"F�G�	���������8�
�
�#6�7�A�A���:�:�&C�D�K�K��%'�J�J�/@�$A�!�(*�z�z�-�'@�$�3��E���%�-�-�'�'��:�(.9�@�)�0�$�0�L	�2�$�$�L	�^
�@
�@
�D#&��S�.�S�<�N�N�$�%�	�I�	�
	�=�	�	��	��m��
	�m�	�	�M�	��]��	�m�	�	�/�	�	�.�	�	�.�	��M��>�-�>�
8�-�}�8�	���E/
H��z+�	��	�s�
H.�/H3�3H=�9H=�<H=

Youez - 2016 - github.com/yon3zu
LinuXploit